<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
	xmlns:controls="clr-namespace:Rhiannon.Ribbon.Controls">

	<Style TargetType="{x:Type controls:Ribbon}">
        <Setter Property="Template">
            <Setter.Value>
				<ControlTemplate TargetType="{x:Type controls:Ribbon}">
                    <TabControl Name="TabControl" DisplayMemberPath="Label">
                        <TabControl.ItemTemplate>
                            <DataTemplate>
                                <!--<TextBlock Text="{Binding Label}" HorizontalAlignment="Center" VerticalAlignment="Center" />-->
                                <TextBlock Text="Home" HorizontalAlignment="Center" VerticalAlignment="Center" />
                            </DataTemplate>
                        </TabControl.ItemTemplate>
                        <TabControl.ContentTemplate>
                            <DataTemplate>
                                <ContentControl Content="{Binding}" />
                            </DataTemplate>
                        </TabControl.ContentTemplate>
                    </TabControl>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

	<Style TargetType="{x:Type controls:RibbonButton}">
        <Setter Property="Template">
            <Setter.Value>
				<ControlTemplate TargetType="{x:Type controls:RibbonButton}">
                    <Button x:Name="BUTTON_PART" Content="{TemplateBinding Label}">
                        <Button.Style>
                            <Style TargetType="{x:Type Button}">
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="{x:Type Button}">
                                            <Border x:Name="Border" BorderBrush="#BBB" BorderThickness="1" Height="20" Width="100"
                                                    Margin="1" Padding="3,0,3,0" HorizontalAlignment="Left">
                                                <ContentPresenter />
                                            </Border>
                                            <ControlTemplate.Triggers>
                                                <Trigger Property="IsMouseOver" Value="true">
                                                    <Setter TargetName="Border" Property="BorderBrush" Value="#999" />
                                                </Trigger>
                                                <Trigger Property="IsEnabled" Value="false">
                                                    <Setter TargetName="Border" Property="TextBlock.Foreground" Value="#AAA" />
                                                </Trigger>
                                            </ControlTemplate.Triggers>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </Button.Style>
                    </Button>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

	<Style TargetType="{x:Type controls:RibbonGroup}">
        <Setter Property="Template">
            <Setter.Value>
				<ControlTemplate TargetType="{x:Type controls:RibbonGroup}">
                    <Border BorderBrush="#DDD" BorderThickness="1" Margin="1,0,1,0" Padding="0">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="70" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <ItemsControl Name="ItemsControl" Grid.Row="0" Margin="2">
                                <ItemsControl.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <WrapPanel Orientation="Vertical" />
                                    </ItemsPanelTemplate>
                                </ItemsControl.ItemsPanel>
                            </ItemsControl>
                            <Border Grid.Row="1" Background="#DDD">
                                <TextBlock Text="{TemplateBinding Label}" HorizontalAlignment="Center" FontFamily="Segoe UI" FontSize="11" Foreground="#333" Margin="0" Padding="0" />
                            </Border>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

	<Style TargetType="{x:Type controls:RibbonTab}">
        <Setter Property="Template">
            <Setter.Value>
				<ControlTemplate TargetType="{x:Type controls:RibbonTab}">
                    <Border Margin="0" Padding="0">
                        <Border.Background>
                            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                <GradientStop Color="#FFF" Offset="0" />
                                <GradientStop Color="#EEE" Offset="1" />
                            </LinearGradientBrush>
                        </Border.Background>
                        <ItemsControl Name="ItemsControl">
                            <ItemsControl.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <StackPanel Orientation="Horizontal" />
                                </ItemsPanelTemplate>
                            </ItemsControl.ItemsPanel>
                        </ItemsControl>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
